
<?php
class Template extends Zend_Db_Table_Abstract{
    protected $_name;
    protected $_primary = 'template_id';

    function __construct() {
        $this->_name = DB_PREFIX . "template";
        parent::__construct();
    }

    public function getColumns() {
        $results = array('template_id', 'template_name', 'template_path', 'template_description', 'template_image');
        return $results;
    }

    public function getPrimaryKey() {
        $pk = $this->_primary;
        if (is_array($pk)) {
            if (count($pk) > 0)
                return $pk[1]; // array[1] contain column name of primary key
        }
        return $this->_primary;
    }
}
?>
